package Interfaces;
import java.io.Serializable;
import java.util.Set;
public class Task implements Serializable {
	
	private static final long serialVersionUID = -4751120753565781651L;
	
	Set<String> requirements;
	int taskId;
	
	public Task(int taskId, Set<String> requirements) {
		this.taskId = taskId;
		this.requirements = requirements;
	}
	
	public Set<String> getRequirements() {
		return this.requirements;
	}
	
	public void execute() {
		// simulate some long running execution
		// sleep for a second
		System.out.println("Executing task " + this.taskId + " ...");
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println("Task " + this.taskId + " done.");
	}
}
